package com.headFirstModel.commandPattern.command;

import com.headFirstModel.commandPattern.action.Strereo;

public class StrereoOffWithCommand implements Command{
    Strereo strereo;

    public StrereoOffWithCommand(Strereo strereo){
        this.strereo=strereo;
    }

    @Override
    public void execute() {
        strereo.off();
    }

    @Override
    public void undo() {
        strereo.setVolume(11);
        strereo.setCd();
        strereo.on();
    }
}
